Location: SLC transporters @ 54f3d5534251 / Facilitated transporter / CellMLV2 / GLUT2_ss_oi.py

Author:
Weiwei Ai <wai484@aucklanduni.ac.nz>
Date:
2024-05-27 15:23:46+12:00
Desc:
Add README.rst
Permanent Source URI:
https://models.physiomeproject.org/workspace/b65/rawfile/54f3d55342510adfa5b7913d94e7b8ab069e5dc1/Facilitated transporter/CellMLV2/GLUT2_ss_oi.py

# The content of this file was generated using the Python profile of libCellML 0.5.0.

from enum import Enum
from math import *


__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"

STATE_COUNT = 1
VARIABLE_COUNT = 45


class VariableType(Enum):
    VARIABLE_OF_INTEGRATION = 0
    STATE = 1
    CONSTANT = 2
    COMPUTED_CONSTANT = 3
    ALGEBRAIC = 4


VOI_INFO = {"name": "t", "units": "second", "component": "GLUT2_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}

STATE_INFO = [
    {"name": "g_o", "units": "mM", "component": "GLUT2_BG", "type": VariableType.STATE}
]

VARIABLE_INFO = [
    {"name": "q_init_Ao", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "g_o", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_Ai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "g_i", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_Ai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_Ao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
    {"name": "q_Ao", "units": "fmol", "component": "GLUT2_BG", "type": VariableType.ALGEBRAIC},
    {"name": "V_o", "units": "pL", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "q_Ai", "units": "fmol", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "g_i", "units": "mM", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "V_i", "units": "pL", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "q_tot", "units": "fmol", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "GC", "units": "uM", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "V_E", "units": "pL", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "v_max_free", "units": "fmol_per_s", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_oi_max", "units": "mM_per_s", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "k_m_1_free", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_oi_math", "units": "mM", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "k_m_2_free", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_io_max", "units": "mM_per_s", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "lambda", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v_max", "units": "fmol_per_s", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_1", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_2", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "k_m_3", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.COMPUTED_CONSTANT},
    {"name": "v", "units": "fmol_per_s", "component": "GLUT2_BG", "type": VariableType.ALGEBRAIC},
    {"name": "v_free", "units": "fmol_per_s", "component": "GLUT2_BG", "type": VariableType.ALGEBRAIC},
    {"name": "k_m_3_free", "units": "dimensionless", "component": "GLUT2_BG", "type": VariableType.CONSTANT},
    {"name": "k_io_math", "units": "mM", "component": "GLUT2_BG", "type": VariableType.CONSTANT}
]


def create_states_array():
    return [nan]*STATE_COUNT


def create_variables_array():
    return [nan]*VARIABLE_COUNT


def initialise_variables(states, rates, variables):
    variables[1] = 1.0e-5
    variables[2] = 0.09
    variables[4] = 10.0
    variables[5] = 0.09
    variables[6] = 8.31
    variables[7] = 273.15
    variables[8] = 149.65
    variables[9] = 149.65
    variables[10] = 33.20
    variables[11] = 0.0017
    variables[12] = 4.25e+03
    variables[13] = 0.0017
    variables[14] = 344.59
    variables[15] = 0.0017
    variables[16] = 1.99
    variables[17] = 0.0017
    variables[18] = 0.36
    variables[19] = 0.26
    variables[20] = 1.01e+05
    variables[21] = 1.01e+04
    variables[23] = 0.09
    variables[25] = 1.0e-8
    variables[26] = 0.09
    variables[28] = 6.67
    variables[29] = 1.0
    variables[31] = 0.004839
    variables[33] = 0.1094
    variables[35] = 0.07117
    variables[43] = 218.96
    variables[44] = 1.609
    states[0] = 1.0e-8


def compute_computed_constants(variables):
    variables[0] = variables[1]*variables[2]
    variables[3] = variables[4]*variables[5]
    variables[24] = variables[25]*variables[26]
    variables[27] = variables[28]*variables[29]*1.0/1000.0
    variables[30] = variables[31]*variables[29]/variables[32]
    variables[32] = variables[33]*variables[26]*variables[8]
    variables[34] = variables[35]*variables[29]/variables[30]
    variables[36] = variables[19]/variables[18]
    variables[37] = variables[27]*variables[19]*variables[14]/(variables[14]/variables[10]+variables[14]/variables[16])
    variables[38] = (variables[14]/variables[10]+variables[14]/variables[16])/(variables[14]/variables[12]+variables[36]*variables[14]/variables[16])
    variables[39] = (variables[14]/variables[10]+variables[14]/variables[16])/(1.0+variables[36]*variables[14]/variables[10])
    variables[40] = (variables[14]/variables[10]+variables[14]/variables[16])/(variables[36]*(1.0+variables[14]/variables[12]))


def compute_rates(voi, states, rates, variables):
    rates[0] = 1.0


def compute_variables(voi, states, rates, variables):
    variables[22] = states[0]*variables[23]
    variables[41] = variables[37]*(variables[9]*variables[22]-variables[8]*variables[24])/(1.0+variables[9]*variables[22]/variables[38]+variables[8]*variables[24]/variables[39]+variables[9]*variables[22]*variables[8]*variables[24]/variables[40])
    variables[42] = variables[30]*(variables[9]*variables[22]-variables[8]*variables[24])/(1.0+variables[9]*variables[22]/variables[32]+variables[8]*variables[24]/variables[34]+variables[9]*variables[22]*variables[8]*variables[24]/variables[43])